package com.walleipt.demo.ioc.autowired;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@ComponentScan("com.walleipt.demo.ioc.autowired")
@Configuration
public class AppConfig {

	@Primary
	@Bean
	public BookDao bookDao2() {
		BookDao bookDao = new BookDao();
		bookDao.setBookName( "Linux book" ) ;
		return bookDao ;
	}
}
